package utl.mofen.easyui;

public class PageBean {	
	private int currentPage;   // 当前页数
	private int countRecord;   // 总记录数
	private int countPage;     // 总页数
	private int sizePage = 10; // 每页记录的条数(行数)

	public void setAll(int countRecord, int sizePage) {
		this.countRecord = countRecord;
		if (sizePage>0)
		{
			this.sizePage = sizePage;
		}
		currentPage = 1;
		
		if (countRecord % sizePage == 0) {
			countPage = countRecord / sizePage;
		} else {
			countPage = countRecord / sizePage + 1;
		}
	}
	
	public void setAll(int countRecord) {
		this.countRecord = countRecord;
		currentPage = 1;
		System.out.println("记录数:" + countRecord);		
		if (countRecord % sizePage == 0) {
			countPage = countRecord / sizePage;
		} else {
			countPage = countRecord / sizePage + 1;
		}
		
	}
	
	public int getCurrentPage() {
		return currentPage;
	}

	public int getCountRecord() {
		return countRecord;
	}

	public int getCountPage() {
		return countPage;
	}

	public int getSizePage() {
		return sizePage;
	}
	
	public void setSizePage(int _size) {
		sizePage = _size;		
	}
	
	public void setContPage(int _value)
	{
		this.countPage = _value;
	}
	

	public void setCurrentPage(int currentPage) {
		this.currentPage = currentPage;
	}
	
	
	

}
